<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<title>emoticons</title>
		<link href="{SITE_URL}images/system/editor.css" rel="stylesheet" type="text/css">
		<script type="text/javascript">
		var old_id = '';
		function emclick(id, str) {
			parent.insertUrl(str);
			if( old_id != '' ){
				document.getElementById(old_id).style.background = '';
				document.getElementById(old_id).style.border = '';
			}
			document.getElementById(id).style.background = '#A4DBEF';
			document.getElementById(id).style.border = '1px solid #EDEF3B';
			old_id = id;
		}
		</script>
	</head>
	
	<body>
		<div class="type2">
		{loop $category $v}
			<a href="editor.php?m=list&a=emoticons&cat={$v[path]}" target="_self">{$v[name]}</a>&nbsp;&nbsp;
		{/loop}
		</div>
		<div style='width:430px;height:195px;'>
			{loop $emoticons $v}
			<img id="{$v[id]}" style="margin: 3px; cursor: pointer;" src="{$v[url]}" title="{$v[description]}" onclick='emclick({$v[id]},"{$v[url]}");'/>
			{/loop}
		</div>
	</body>
</html>